﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Zd.MicroService.WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class DataController : ControllerBase
    {
        private readonly IConfiguration _configuration;
        private IList<string> Datas = new List<string> { ".NetF", ".NetC", ".Net5", "CLR" };

        public DataController(IConfiguration configuration) {
            _configuration = configuration;
        }

        [HttpGet]
        public IList<string> Get() {
            string port = _configuration["port"];
            Console.WriteLine(port);
            return Datas.Append(port).ToList();
        }
    }
}